<template>
  <div class="c-selectBox">

      <div class="selectBox" :class="{'selectBox_active':checked}">

          <div class="selectBox-img">

            <img :src="img" alt="">

          </div>

          <div class="selectBox-text">

            {{text}}

          </div>

      </div>

  </div>
</template>
<script>

    export default {
        props: {
           img:{
             type:String,
             default:"static/image/selectbox/i1.png"
           },
           text:{
             type:String,
             default:"修身款"
          },
          checked:{
             type:Boolean,
             default:false,
          }
        },
        data() {
            return {}
        },
        methods: {},
        components: {},
        mounted() {
        },
        created() {

        },
        beforeRouteEnter(to, from, next) {
            next(vm => {

            })
        },
        beforeRouteUpdate(to, from, next) {
            next(vm => {

            })
        },
        beforeRouteLeave(to, from, next) {
            next(vm => {

            })
        }
    }
</script>

<style lang="less">
  @import "../common/style/helpers/mixins.less";

  @color:#9e2828;
  .c-selectBox{
      width: 70px;
      float: left;
      margin-right: 20px;
      margin-bottom: 10px;
      .selectBox{
        width: 100%;
        cursor: pointer;

        &-img{
          height:78px;
          width: 70px;
          border: 3px solid #ccc;
          border-radius: 3px;
          img{
            width: 100%;
            height: 100%;
          }
        }

        &-text{
          padding: 0px 0;
          font-size: 12px;
          color: #333;
          text-align: center;
          letter-spacing: 1px;
          .omit();
        }

        &_active{
          .selectBox-img{
            border-color:  @color;
          }
          .selectBox-text{
            color: @color;
          }
        }

        &:hover{
          .selectBox-img{
            border-color: @color;
          }
          .selectBox-text{
            color: @color;
          }
        }
      }
  }

</style>
